package com.ruoyi.vehicles.mapper;

import java.util.List;
import com.ruoyi.vehicles.domain.AVehicles;
import org.apache.ibatis.annotations.Param;

/**
 * 车辆Mapper接口
 *
 * @author ruoyi
 * @date 2025-04-07
 */
public interface AVehiclesMapper
{
    /**
     * 查询车辆
     *
     * @param id 车辆主键
     * @return 车辆
     */
    public AVehicles selectAVehiclesById(Long id);

    /**
     * 查询车辆列表
     *
     * @param aVehicles 车辆
     * @return 车辆集合
     */
    public List<AVehicles> selectAVehiclesList(AVehicles aVehicles);

    /**
     * 新增车辆
     *
     * @param aVehicles 车辆
     * @return 结果
     */
    public int insertAVehicles(AVehicles aVehicles);

    /**
     * 修改车辆
     *
     * @param aVehicles 车辆
     * @return 结果
     */
    public int updateAVehicles(AVehicles aVehicles);

    /**
     * 删除车辆
     *
     * @param id 车辆主键
     * @return 结果
     */
    public int deleteAVehiclesById(Long id);

    /**
     * 批量删除车辆
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteAVehiclesByIds(Long[] ids);

    /**
     * 根据车牌号查找车辆信息
     * @param licensePlate
     * @return
     */
    AVehicles selectAVehiclesLicensePlate(String licensePlate);

    /**
     * 批量修改车辆
     * @param aVehiclesList
     * @return
     */
    Integer updateAVehiclesStatus(List<AVehicles> aVehiclesList);

    /**
     * 除去本部门id查询车辆
     * @param aVehicles
     * @param deptId
     * @return
     */
    List<AVehicles> selectAVehiclesListDept(@Param("value") AVehicles aVehicles, @Param("deptId") Long deptId);

    List<AVehicles> selectDispatchableAVehiclesList(AVehicles aVehicles);

    void updateAVehiclesUsingDepartment(AVehicles aVehicles);

    List<AVehicles> selectAvailableAVehiclesList(@Param("aVehicles") AVehicles aVehicles, @Param("deptId") Long deptId);
}
